package com.xqboss.apps.domain.order;

import com.baomidou.mybatisplus.annotation.TableField;
import com.xqboss.apps.domain.BaseTable;
import com.xqboss.apps.enums.order.OrderTypeEnum;
import com.xqboss.apps.enums.order.PayStatusEnum;
import com.xqboss.apps.enums.user.PayTypeEnum;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 订单支付
 * @author Trent
 * @date 2023/8/28
 */
@Data
public class PayApply extends BaseTable {

    @ApiModelProperty("支付流水号")
    private String id;

    @ApiModelProperty("支付用户ID")
    private Long userId;

    @ApiModelProperty("支付订单号")
    private Long orderMainId;

    @ApiModelProperty("商品名称")
    private String subject;

    @ApiModelProperty("支付方式")
    private PayTypeEnum payType;

    @ApiModelProperty("支付账号")
    private Long payAccountId;

    @ApiModelProperty("订单金额")
    private BigDecimal orderAmount;

    @ApiModelProperty("支付状态")
    private PayStatusEnum payStatus;

    @ApiModelProperty("外部交易号")
    private String outTradeNo;

    @ApiModelProperty("支付用户ID")
    private String buyerId;

    @ApiModelProperty("支付用户账号")
    private String buyerAccount;

    @ApiModelProperty("收款商家ID")
    private String sellerId;

    @ApiModelProperty("收款商家账号")
    private String sellerAccount;

    @ApiModelProperty("实际收款金额")
    private BigDecimal receiptAmount;

    @ApiModelProperty("买家实际付款金额")
    private BigDecimal payAmount;

    @ApiModelProperty("退款金额")
    private BigDecimal refundFee;

    @ApiModelProperty("支付截止时间")
    private LocalDateTime expireTime;

    @ApiModelProperty("用户支付时间")
    private LocalDateTime payTime;

    @ApiModelProperty("退款时间")
    private LocalDateTime refundTime;

    @ApiModelProperty("订单处理状态")
    private Boolean isOrderHandler;

    @ApiModelProperty("支付信息")
    private String payInfo;

    @TableField(exist = false)
    @ApiModelProperty(value = "订单类型")
    private OrderTypeEnum orderType;
}
